package system

import (
	v1 "server/handler/v1"
	"server/middleware"

	"github.com/gin-gonic/gin"
)

func RegisterRoleMenuRoutes(group *gin.RouterGroup) {
	roleMenuGroup := group.Group("/role_menu")
	handlerApp := v1.NewHandlerApp()
	roleMenuGroup.Use(middleware.AuthorizationMiddleware())
	{
		roleMenuGroup.POST("/create", handlerApp.RoleMenuHandler.CreateRoleMenuInfoHandler)
		roleMenuGroup.DELETE("/delete/:id", handlerApp.RoleMenuHandler.DeleteRoleMenuInfoHandler)
		roleMenuGroup.PUT("/modify", handlerApp.RoleMenuHandler.ModifyRoleMenuInfoHandler)
		roleMenuGroup.GET("/info/:id", handlerApp.RoleMenuHandler.GetRoleMenuInfoHandler)
		roleMenuGroup.GET("/list", handlerApp.RoleMenuHandler.GetRoleMenuListHandler)
		roleMenuGroup.GET("/page", handlerApp.RoleMenuHandler.GetRoleMenuPageHandler)
	}
}
